package com.alingrad.android.froyoengine;

import android.util.Log;

/**
 * Class to warn whether or not and object gets allocated.
 * @author Alan Guo
 *
 */
public abstract class AllocationGuard {

	public AllocationGuard() {
		if (GameProperties.IS_DEBUGGING)
			Log.w(GameProperties.DEBUG_TAG, "Allocation!: " + getClass().getName());
	}
	
	@Override
	protected void finalize() throws Throwable {
		super.finalize();
		if (GameProperties.IS_DEBUGGING)
			Log.w(GameProperties.DEBUG_TAG, "Deallocation!: " + getClass().getName());
	}
}
